-- GENERATED SPELL FOR [Warsong Outrider] --


function spell0_12864(pUnit, Event) --@Scorpid Sting,n/a--
pUnit:FullCastSpellOnTarget(18545,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12864', 20316, 1)
end

function spell1_12864(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12864', 626, 1)
end

function Sorts_12864(pUnit, Event)
local choix_sorts_12864 = math.random(0, 1)
if choix_sorts_12864 == 0 then
pUnit:RegisterEvent('spell0_12864', 1, 1)
end
if choix_sorts_12864 == 1 then
pUnit:RegisterEvent('spell1_12864', 1, 1)
end
end

function mob12864_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12864', math.random(1500, 3000), 1)
end

function mob12864_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12864_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12864_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12864, 1, 'mob12864_Action')
RegisterUnitEvent(12864, 2, 'mob12864_Leave')
RegisterUnitEvent(12864, 3, 'mob12864_Kill')
RegisterUnitEvent(12864, 4, 'mob12864_Die')
